<html>
<head>
<title>HtmlEditor example</title>
<link rel="stylesheet" type="text/css" href="default.css" />
<script type="text/javascript" src="../src/main/js/loader.js"></script>
<script type="text/javascript">

	load('core.ui.HtmlEditor');

	function init() {
		editor = new core.ui.HtmlEditor(null, 0, 0, 640, 480);
		editor.addEditorListener({
			onEditorSelectionChange : function(editor) {
				document.getElementById('selected').innerHTML = editor.getSelectedText();
			}
		});
		editor.center();
		editor.show();
	}
	
</script>
</head>

<body onload="init()">

<a href="javascript:editor.setBold()">Bold</a> | 
<a href="javascript:editor.setItalic()">Italic</a> | 
<a href="javascript:editor.setUnderline()">Underline</a><br>

<a href="javascript:editor.justifyLeft()">Left</a> | 
<a href="javascript:editor.justifyCenter()">Center</a> | 
<a href="javascript:editor.justifyRight()">Right</a><br>

<a href="javascript:editor.indent()">Indent</a> | 
<a href="javascript:editor.outdent()">Outdent</a><br>

<a href="javascript:editor.insertOrderedList()">Ordered List</a> | 
<a href="javascript:editor.insertUnorderedList()">Unordered List</a><br>

Selected text: <span id="selected"></span>

</body>
</html>